package com.cloudkinto.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 产品分类
 * </p>
 *
 * @author long
 * @since 2024-10-29
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_product_category")
public class ProductCategoryDo extends Model<ProductCategoryDo> {

    private static final long serialVersionUID = 1L;

    /**
     * 产品分类主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField(value = "tenant_id", fill = FieldFill.INSERT)
    private Long tenantId;

    /**
     * 分类名
     */
    @TableField("category_name")
    private String categoryName;

    /**
     * 父id
     */
    @TableField("parent_id")
    private Long parentId;

    /**
     * 全路径 id
     */
    @TableField("full_path")
    private String fullPath;

    /**
     * 全路径 分类名
     */
    @TableField("full_path_name")
    private String fullPathName;

    /**
     * 级别
     */
    @TableField("tier")
    private Integer tier;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
